<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        .box {
            width: 900px;
            height: 800px;
            border: 1px solid red;
            display: flex;
            /* justify-content 调整的是主轴方向上的对齐 */
            justify-content: space-around;

            /*  align-items 调整的是侧轴方向上的对齐(所有子元素) */
            /*  center      居中对齐
                flex-start  顶部对齐
                flex-end    底部对齐
                stretch     侧轴方向上的拉伸
            */
            align-items: center;
        }
        .first {
            width: 200px;
            height: 200px;
            background-color:red;
        }
        .second {
            width: 200px;
            height: 200px;
            background-color:purple;
            /* 单个元素在侧轴方向上的对齐方式 */
            align-self:flex-end;
        }
        .third {
            width: 200px;
            height: 200px;
            background-color:green;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="first"></div>
        <div class="second"></div>
        <div class="third"></div>
    </div>
    
</body>
</html>